package ${config.packageName}${module}<#noparse>.</#noparse>${config.query.packageName};

import java.util.Date;
import lombok.Data;
import lombok.experimental.Accessors;
import com.swan.mybatis.condition.Condition;
import com.swan.mybatis.condition.OpType;
import ${config.query.parentClass.canonicalName};
import ${config.packageName}${module}<#noparse>.</#noparse>${config.po.packageName}<#noparse>.</#noparse>${config.po.namePrefix!''}${table.className}${config.po.nameSuffix!''}.Fields;


/** ${table.comment}
* @author ${author}
* @since ${createDate}
*/
@Data
@Accessors(chain = true)
public class ${config.query.namePrefix!''}${table.className}${config.query.nameSuffix!''} <#if config.query.parentClass??>extends ${config.query.parentClass.simpleName}</#if>{
<#list columns as field>

    /** ${field.columnComment} */
    private ${field.fieldType} ${field.fieldName};
</#list>

    @Override
    public Condition toCondition() {
        Condition condition = Condition.newInstance();

        condition.and(Fields.id, OpType.equals, this.id);

        return condition;
    }

}
